#pragma once

#include "../Utilities/utilities.h"
#include "Defines.h"

class cCamera
{
protected:
	static cCamera *ms_Instance;

	cCamera();
	cCamera(const cCamera &) { }
	cCamera& operator =(const cCamera &) { }
	virtual ~cCamera();

public:
	// Data member
	Vector3 m_vPos;
	Vector3 m_vLookAt;
	Vector3 m_vUp;
	float m_fSpeed;

	Matrix m_maView;
	Matrix m_maProjection;

	// Static methods
	static cCamera* GetInstance();
	static void DestroyInstance();

	// Methods
	Matrix GetViewMatrix();
	Matrix GetProjectionMatrix();
	Vector3 GetXAxis();
	Vector3 GetYAxis();
	Vector3 GetZAxis();

	void ComputeView();
	Matrix ComputeWorldMatrix();

	void MoveLeft();
	void MoveRight();
	void MoveForward();
	void MoveBack();
	void MoveUp();
	void MoveDown();

	void RotateX(const float &angle);
	void RotateY(const float &angle);
	void RotateZ(const float &angle);
};
